package com.teamwechat.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author cr
 * @date 2022/6/30
 * @description
 */
@ApiModel("测试sayhello参数类")
@Data
public class TestSayHelloVo {


    @NotBlank
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,15}$",message = "姓名应为2-15中文")
    @ApiModelProperty("姓名：2-15中文")
    private String name;

    @NotBlank(message = "姓名不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,15}$",message = "姓名应为2-15中文")
    @ApiModelProperty("姓名：必须是中文")
    private String sname;
    @NotBlank(message = "密码不能为空")
    @Length(max = 20,min = 9,message = "密码在9-20为之间")
    private String password;
}